home *** CD-ROM | disk | FTP | other *** search
- #include "shape.hpp"
- #include "rectpie.hpp"
- #include <iostream.h>
- #include <stdlib.h>
-
- main()
- {
- int gdriver = (int)DETECT, gmode, errorcode;
- initgraph(&gdriver,&gmode,"\\borlandc\\bgi");
- errorcode = graphresult();
- if (errorcode != (int)grOk) {
- cerr << "Graphics error: "
- << grapherrormsg(errorcode)
- << "\nProgram Terminating";
- exit(1);
- }
-
- Segment s = Segment(0,0,3,
- new Circle(),
- new Rectangle(),
- new Segment(20,20,2,
- new PieSlice(),
- new Rectangle()
- )
- );
-
- s.show();
- s.show(getmaxx()/2, getmaxy()/2, 2);
-
- (void) cin.get();
- closegraph();
- return 0;
- }
-